package com.wanhe.base.model.holder;


import com.wanhe.base.model.base.Dish;

import java.util.HashMap;

/**
 * 菜品数据缓存
 * Created by Administrator on 2016/6/13.
 */
public class DishHolder extends HashMap<String, Dish> {
    private static DishHolder ourInstance;

    public synchronized static DishHolder getInstance() {
        if (ourInstance == null){
            ourInstance = new DishHolder();
        }
        return ourInstance;
    }

    private DishHolder() {
    }

    public void release() {
        ourInstance.clear();
        ourInstance = null;
    }
}
